package com.asset.dispoal.abolishPool.service;

import com.asset.dispoal.abolishPool.api.AbolishPoolService;
import com.asset.dispoal.abolishPool.dto.AbolishPoolResponse;
import com.asset.dispoal.abolishPool.dto.QueryAbolishPoolRequest;
import com.asset.dispoal.abolishPool.dto.SaveAbolishPoolRequest;
import com.asset.dispoal.abolishPool.service.common.DeletebolishPoolCommand;
import com.asset.dispoal.abolishPool.service.common.QueryAbolishPoolCommand;
import com.asset.dispoal.abolishPool.service.common.SaveAbolishPoolCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

/**
 * @description:
 * @author: yf
 * @date: 2022-09-22 14:07:29
 */
@Service
public class AbolishPoolServiceImpl implements AbolishPoolService {
    @Autowired
    private SaveAbolishPoolCommand saveAbolishPoolCommand;
    @Autowired
    private QueryAbolishPoolCommand queryAbolishPoolCommand;
    @Autowired
    private DeletebolishPoolCommand deletebolishPoolCommand;

    @Override
    public Result save(SaveAbolishPoolRequest request) {
        return saveAbolishPoolCommand.execute(request);
    }

    @Override
    public Result<PageVO<AbolishPoolResponse>> query(QueryAbolishPoolRequest request) {
        return queryAbolishPoolCommand.execute(request);
    }

    @Override
    public Result delete(String configId) {
        return deletebolishPoolCommand.execute(configId);
    }
}
